package cn.zhangxin.pethome.system.department.domain;

import cn.zhangxin.pethome.base.domain.BaseDomain;
import cn.zhangxin.pethome.system.employee.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    @ApiParam(value = "部门编号",required = true)
    private String sn;
    @ApiParam(value = "部门名称属性",required = true)
    private String name;
    @ApiParam(value = "部门的上级分类层级id属性",required = true)
    private String dirPath;
    @ApiParam(value = "部门状态，0正常，1禁用属性",required = true)
    private Integer state;
    @ApiParam(value = "部门管理员，关联Employee表id属性",required = true)
    private Long manager_id;
    @ApiParam(value = "上级部门属性",required = true)
    private Long parent_id;
    private Long shop_id;


    //查询员工表的数据
    private Employee manager;
    //自关联父表数据
    private Department parent;

    //无限级树
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList();

}
